package com.dabai.iot.core.api;

import com.dabai.iot.core.entity.ConsumerGroupEntity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 消费组服务 Stub
 *
 * @author kev1n
 */
@Slf4j
@RequiredArgsConstructor
public class RemoteConsumerServiceStub implements RemoteConsumerService {

    private final RemoteConsumerService remoteConsumerService;

    @Override
    public ConsumerGroupEntity getConsumerByGroupID(String groupID) {
        try {
            return remoteConsumerService.getConsumerByGroupID(groupID);
        } catch (Exception e) {
            log.warn("Dubbo - 消费组服务未找到");
            return null;
        }
    }

}
